<template>
  <div id="app">
    <el-cascader
        size="large"
        :options="options"
        v-model="selectedOptions"
        @change="handleChange">
    </el-cascader>
  </div>
</template>

<script>
import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
export default {
  data () {
    return {
      options: regionData,
      selectedOptions: []
    }
  },

  methods: {
    handleChange (value) {
      console.log("省市区code：", value[0],value[1],value[2]);
      console.log('省市区：',CodeToText[value[0]],CodeToText[value[1]],CodeToText[value[2]]);
    }
  }
}
</script>